package com.flute.haflute.jobbox.common;

import java.util.ArrayList;
import java.util.List;

import com.flute.haflute.jobbox.base.RunProcessInterface;

/**
 * 所有后台处理线程的管理者
 */
public class RunProcessLauncher {

	private static List<RunProcessInterface> processCache = new ArrayList<RunProcessInterface>();

	/**
	 * 装载定制的Process
	 */
	public static void launchCustomProcesses() {
		// TODO lauch customized processes
	}

	/**
	 * 取得当前所有的Process
	 */
	public static List<RunProcessInterface> getRunProcessList() {
		return processCache;
	}

	/**
	 * 添加process到process池中
	 * 
	 * @param process
	 *            RunProcessInterace
	 */
	public static void addRunProcess2Cache(RunProcessInterface process) {
		processCache.add(process);
	}
}
